<!--
  描述：故障管理table页
  @author chengguang
  @since 2021/11/17 15:31
-->
<!DOCTYPE html SYSTEM "http://www.thymeleaf.org/dtd/xhtml1-strict-thymeleaf-4.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">

<table class="layui-hide" id="zmn-table" lay-filter="zmn-table" th:fragment="table">
    <thead>
    <tr>
        <th lay-data="{field:'faultId',type:'checkbox', width:50, unresize:true, align:'center', fixed:'left'}"></th>

        <th lay-data="{field:'sort',width:60, unresize:true, align:'center', edit:'text'}">排序</th>
        <th lay-data="{field:'faultId', unresize:true, align:'center'}">ID</th>
        <th lay-data="{field:'faultName', unresize:true, align:'center'}">故障名称</th>
        <th lay-data="{field:'status', width:80, unresize:true, align:'center'}">状态</th>
        <th lay-data="{field:'updaterAndUpdateTime', unresize:true, align:'center'}">最近修改</th>
        <th lay-data="{field:'操作', width:140, unresize:true, align:'center', fixed:'right'}">操作</th>

    </tr>
    </thead>
    <tbody>
    <tr th:each="item:${items}">
        <td></td>
        <td th:text="${item.sort}">sort</td>
        <td th:text="${item.faultId}">faultId</td>
        <td th:text="${item.faultName}">faultName</td>
        <td>
            <input th:disabled="${(#authPermit.checkPermit('/base/fault/updateStatus.action'))?'false':'true'}"
                   type="checkbox" name="status" id="status" th:key="${item.faultId}" th:value="${item.status}"
                   lay-text="ON|OFF" lay-skin="switch" lay-filter="chk_one_status"
                   th:checked="${item.status == 2}"/>
        </td>
        <td th:text="${item.updater} + '/' + ${T(com.zmn.common.utils.date.DateUtil).toString(item.updateTime)}">
            updaterAndUpdateTime
        </td>
        <td>
            <zmn th:if="${#authPermit.checkPermit('/base/fault/addEditView.action')}">
                <a class="btn-operate" style="color: #00a0e9;cursor: pointer;" th:data-id="${item.faultId}">修改</a>
            </zmn>
        </td>
    </tr>
    </tbody>
</table>
